package nl.Viewer.SerializedObjects;

import java.util.HashMap;

/**
 * Client-side deserialization of a dataset 
 * 
 * @author Jeroen Verschuur
 * 
 */

public class Dataset {
   public final int                           datasetId;
   public final String                        name;
   public final String                        description;

   protected final HashMap<Integer, Modality> modalities = new HashMap<Integer, Modality>();

   public Dataset( int datasetId, String name, String description ) {
      this.datasetId = datasetId;
      this.name = name;
      this.description = description;
   }

   public void addModality( Modality modality ) {
      modalities.put( modality.modalityId, modality );
   }

   public Modality getModality( int modalityId ) {
      return modalities.get( modalityId );
   }

   public HashMap<Integer, Modality> getModalities() {
      return modalities;
   }

   public String toString() {
      return "Dataset: [" + datasetId + "/" + name + "/" + description + "/modalities: " + modalities.size() + "]";
   }

}
